package com.sitia.system.service.impl;

import java.util.List;
import com.sitia.common.utils.DateUtils;
import com.sitia.system.mapper.MxProvinceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sitia.system.domain.MxProvince;
import com.sitia.system.service.IMxProvinceService;

/**
 * 省份Service业务层处理
 * 
 * @author sitia
 * @date 2023-07-16
 */
@Service
public class MxProvinceServiceImpl implements IMxProvinceService 
{
    @Autowired
    private MxProvinceMapper mxProvinceMapper;

    /**
     * 查询省份
     * 
     * @param id 省份主键
     * @return 省份
     */
    @Override
    public MxProvince selectMxProvinceById(Long id)
    {
        return mxProvinceMapper.selectMxProvinceById(id);
    }

    /**
     * 查询省份列表
     * 
     * @param mxProvince 省份
     * @return 省份
     */
    @Override
    public List<MxProvince> selectMxProvinceList(MxProvince mxProvince)
    {
        return mxProvinceMapper.selectMxProvinceList(mxProvince);
    }

    /**
     * 新增省份
     * 
     * @param mxProvince 省份
     * @return 结果
     */
    @Override
    public int insertMxProvince(MxProvince mxProvince)
    {
        mxProvince.setCreateTime(DateUtils.getNowDate());
        return mxProvinceMapper.insertMxProvince(mxProvince);
    }

    /**
     * 修改省份
     * 
     * @param mxProvince 省份
     * @return 结果
     */
    @Override
    public int updateMxProvince(MxProvince mxProvince)
    {
        return mxProvinceMapper.updateMxProvince(mxProvince);
    }

    /**
     * 批量删除省份
     * 
     * @param ids 需要删除的省份主键
     * @return 结果
     */
    @Override
    public int deleteMxProvinceByIds(Long[] ids)
    {
        return mxProvinceMapper.deleteMxProvinceByIds(ids);
    }

    /**
     * 删除省份信息
     * 
     * @param id 省份主键
     * @return 结果
     */
    @Override
    public int deleteMxProvinceById(Long id)
    {
        return mxProvinceMapper.deleteMxProvinceById(id);
    }
}
